import { reactive } from "vue";
import type { FormRules } from "element-plus";
// 导出一个函数来设置原始名称
let _originalFormName = "";

export function setOriginalFormName(name: string) {
  _originalFormName = name;
}

export const formRules = reactive(<FormRules>{
  name: [{ required: true, message: "资源名称为必填项", trigger: "blur" }],
  code: [{ required: true, message: "资源编号为必填项", trigger: "blur" }],
  type: [{ required: true, message: "请选择资源类型", trigger: "change" }],
  lesseeId: [{ required: true, message: "请选择租户", trigger: "change" }],
  uri: [{ required: true, message: "资源URI为必填项", trigger: "blur" }]
});
